package com.zhentao.controller;

import com.zhentao.model.common.buiness.vo.ApProductVo;
import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.service.ApProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 86150
 */
@Api(value = "/product", tags = {""})
@RestController
@RequestMapping("/product")
public class ApProductController {
    @Resource
    private ApProductService apProductService;

    /**
     * 商品查询
     * @return
     */
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", dataType = "ApProductVo", name = "productVo", value = "", required = true)
    })
    @ApiOperation(value = "商品查询", notes = "商品查询", httpMethod = "POST")
    @PostMapping("/prolist")
    public ResponseResult prolist(@RequestBody ApProductVo productVo){
       return apProductService.productList(productVo);
    }
}
